﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Areas/CustomerAdmin/Customer.Master" CodeBehind="GroupsMails.aspx.cs" Inherits="OnlineBusinesses.Areas.CustomerAdmin.MailBox.GroupsMails" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="ContentCustomerAdmin">
    <div class="col-md-12" style="padding: 10px;">
        <h3 style="font-weight: bold;">Quản lý nhóm mail </h3>
        <div class="col-md-12 col-xs-12" style="padding: 10px 0px;">
            <h4 class="text-danger">
                <asp:Label ID="lbNotice" runat="server"></asp:Label>
            </h4>
            <div class="col-md-6" style="padding-left: 0px; padding-top: 10px">
                <asp:TextBox ID="txtTenNhom" runat="server" type="txt" class="input_add" placeholder="Tên nhóm" />
            </div>
            <div class="col-md-6" style="padding-left: 0px; padding-top: 10px;">
                <%--<asp:TextBox ID="txtGroupMail" runat="server" type="txt" class="input_add" placeholder="Email nhóm" /><asp:Label runat="server" ID="lblDomain"></asp:Label>--%>
                <div class="col-md-6" style="padding: 0px;">
                    <asp:TextBox ID="txtGroupMail" runat="server" type="text" class="input_add" placeholder="email nhóm .." />
                </div>
                <div class="col-md-6" style="padding: 0px;">
                    <span style="line-height: 33px; color: #aaa; font-size: 16px; margin-left: 5px;">
                        <asp:Label runat="server" ID="lblDomain"></asp:Label></span>
                </div>
            </div>
            <div class="col-md-6" style="padding-left: 0px; padding-top: 10px;">
                <asp:TextBox ID="txtDienGiai" runat="server" type="text" class="input_add" placeholder="Diễn giải .." />
            </div>
            <div class="col-md-2"  style="padding-left: 0px; padding-top: 10px;">
                <asp:LinkButton ID="btnCreate" runat="server"  OnClientClick="ShowProgress();" OnCommand="btnCreate_Click" class="btn btn-default" Style="width: 100%; border-radius: 0px; background: #32CCFE; color: #fff;">Tạo nhóm</asp:LinkButton>
                <asp:LinkButton ID="btnEditSuccess"  OnClientClick="ShowProgress();" runat="server" OnCommand="btnEditSuccess_Click" class="btn btn-success" Style="width: 100%; border-radius: 0px;">Lưu thay đổi</asp:LinkButton>
            </div>
        </div>
    </div>
    <div class="col-md-12" style="margin: 10px 0px; padding: 0px; height: 1px; background: #ddd;"></div>
    <div class="col-md-12 col-lg-12 col-xs-12 col-sm-12" style="padding: 10px; padding-bottom: 50px;">
        <div class="table-responsive">
            <asp:ListView
                ID="lvGroups"
                runat="server">
                <LayoutTemplate>
                    <table class="table table-bordered table-striped" id="dataTables-example">
                        <thead>
                            <tr>
                                <th style="width: 50px; text-align: center;">STT</th>
                                <th>Tên nhóm</th>
                                <th>Diễn giải</th>
                                <th style="width: 110px; text-align: center;">Số người</th>
                                <th style="width: 110px; text-align: center;">Trạng thái</th>
                                <th style="width: 180px; padding-left: 10px;">Tùy chỉnh</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr id="ItemPlaceholder" runat="server">
                            </tr>
                        </tbody>
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr>
                        <td style="vertical-align: middle; text-align: center;"><%# Container.DisplayIndex + 1  %></td>
                        <td style="vertical-align: middle; font-weight: bold;"><%# Eval("GroupName")  %></td>
                        <td style="vertical-align: middle; overflow: hidden;"><%# Eval("Description")  %></td>
                        <td style="vertical-align: middle; text-align: center;"><%# Eval("NumberOfAccounts")  %></td>
                        <td style="vertical-align: middle; text-align: center;">
                            <span class="fa <%# bool.Parse(Eval("IsDelete").ToString()) == true ? "fa-lock" : "fa-unlock"  %>" style="font-size: 20px;"></span>
                        </td>
                        <td style="vertical-align: middle; text-align: right;">
                            <a href="ViewGroupsMails.aspx?id=<%# Eval("GroupID")  %>"  onclick="ShowProgress();" style="color: #333; text-decoration: none;">
                                <span class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Danh sách người dùng" style="border-radius: 0px; margin-right: 10px;">
                                    <span class="fa fa-eye"></span>
                                </span>
                            </a>
                            <asp:LinkButton OnClientClick="ShowProgress();" runat="server" CommandArgument='<%#Eval("GroupID") %>' ID="btnEdit" OnCommand="btnEdit_Click" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Chỉnh sửa" Style="border-radius: 0px; margin-right: 10px;"><span class="fa fa-wrench"></span></asp:LinkButton>
                            <asp:LinkButton runat="server" ID="btnDel" OnCommand="btnDel_Click" CommandArgument='<%#Eval("GroupID") %>' OnClientClick="return confirm('Bạn có chắc là muốn xoá không?');" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Xóa" Style="border-radius: 0px; margin-right: 10px;"><span class="fa fa-times"></span></asp:LinkButton>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:ListView>
        </div>
    </div>
</asp:Content>
